3.188 \(\int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x)) \, dx\)

Optimal. Leaf size=56 \[ \frac {a (c+d) \tan (e+f x)}{f}+\frac {a (2 c+d) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {a d \tan (e+f x) \sec (e+f x)}{2 f} \]

[Out]

1/2*a*(2*c+d)*arctanh(sin(f*x+e))/f+a*(c+d)*tan(f*x+e)/f+1/2*a*d*sec(f*x+e)*tan(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3997, 3787, 3770, 3767, 8} \[ \frac {a (c+d) \tan (e+f x)}{f}+\frac {a (2 c+d) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {a d \tan (e+f x) \sec (e+f x)}{2 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]*(a + a*Sec[e + f*x])*(c + d*Sec[e + f*x]),x]

[Out]

(a*(2*c + d)*ArcTanh[Sin[e + f*x]])/(2*f) + (a*(c + d)*Tan[e + f*x])/f + (a*d*Sec[e + f*x]*Tan[e + f*x])/(2*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3787

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3997

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.
) + (A_)), x_Symbol] :> -Simp[(b*B*Cot[e + f*x]*(d*Csc[e + f*x])^n)/(f*(n + 1)), x] + Dist[1/(n + 1), Int[(d*C
sc[e + f*x])^n*Simp[A*a*(n + 1) + B*b*n + (A*b + B*a)*(n + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f
, A, B}, x] && NeQ[A*b - a*B, 0] &&  !LeQ[n, -1]

Rubi steps

\begin {align*} \int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x)) \, dx &=\frac {a d \sec (e+f x) \tan (e+f x)}{2 f}+\frac {1}{2} \int \sec (e+f x) (a (2 c+d)+2 a (c+d) \sec (e+f x)) \, dx\\ &=\frac {a d \sec (e+f x) \tan (e+f x)}{2 f}+(a (c+d)) \int \sec ^2(e+f x) \, dx+\frac {1}{2} (a (2 c+d)) \int \sec (e+f x) \, dx\\ &=\frac {a (2 c+d) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {a d \sec (e+f x) \tan (e+f x)}{2 f}-\frac {(a (c+d)) \operatorname {Subst}(\int 1 \, dx,x,-\tan (e+f x))}{f}\\ &=\frac {a (2 c+d) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {a (c+d) \tan (e+f x)}{f}+\frac {a d \sec (e+f x) \tan (e+f x)}{2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 75, normalized size = 1.34 \[ \frac {a c \tan (e+f x)}{f}+\frac {a c \tanh ^{-1}(\sin (e+f x))}{f}+\frac {a d \tan (e+f x)}{f}+\frac {a d \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {a d \tan (e+f x) \sec (e+f x)}{2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]*(a + a*Sec[e + f*x])*(c + d*Sec[e + f*x]),x]

[Out]

(a*c*ArcTanh[Sin[e + f*x]])/f + (a*d*ArcTanh[Sin[e + f*x]])/(2*f) + (a*c*Tan[e + f*x])/f + (a*d*Tan[e + f*x])/
f + (a*d*Sec[e + f*x]*Tan[e + f*x])/(2*f)

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 96, normalized size = 1.71 \[ \frac {{\left (2 \, a c + a d\right )} \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (2 \, a c + a d\right )} \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (a d + 2 \, {\left (a c + a d\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{4 \, f \cos \left (f x + e\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e)),x, algorithm="fricas")

[Out]

1/4*((2*a*c + a*d)*cos(f*x + e)^2*log(sin(f*x + e) + 1) - (2*a*c + a*d)*cos(f*x + e)^2*log(-sin(f*x + e) + 1)
+ 2*(a*d + 2*(a*c + a*d)*cos(f*x + e))*sin(f*x + e))/(f*cos(f*x + e)^2)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)2/f*((-2*a*c-a*d)/4*ln(abs(tan((f*x+exp(1))/2)-1))-(-2*a*c-a*d
)/4*ln(abs(tan((f*x+exp(1))/2)+1))-(2*tan((f*x+exp(1))/2)^3*a*c+tan((f*x+exp(1))/2)^3*a*d-2*tan((f*x+exp(1))/2
)*a*c-3*tan((f*x+exp(1))/2)*a*d)*1/2/(tan((f*x+exp(1))/2)^2-1)^2)

________________________________________________________________________________________

maple [A]  time = 0.96, size = 86, normalized size = 1.54 \[ \frac {c a \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}+\frac {d a \tan \left (f x +e \right )}{f}+\frac {a c \tan \left (f x +e \right )}{f}+\frac {a d \sec \left (f x +e \right ) \tan \left (f x +e \right )}{2 f}+\frac {d a \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e)),x)

[Out]

1/f*c*a*ln(sec(f*x+e)+tan(f*x+e))+1/f*d*a*tan(f*x+e)+a*c*tan(f*x+e)/f+1/2*a*d*sec(f*x+e)*tan(f*x+e)/f+1/2/f*d*
a*ln(sec(f*x+e)+tan(f*x+e))

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 88, normalized size = 1.57 \[ -\frac {a d {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 4 \, a c \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) - 4 \, a c \tan \left (f x + e\right ) - 4 \, a d \tan \left (f x + e\right )}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e)),x, algorithm="maxima")

[Out]

-1/4*(a*d*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(sin(f*x + e) + 1) + log(sin(f*x + e) - 1)) - 4*a*c*log(se
c(f*x + e) + tan(f*x + e)) - 4*a*c*tan(f*x + e) - 4*a*d*tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 2.57, size = 111, normalized size = 1.98 \[ \frac {a\,\mathrm {atanh}\left (\frac {2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,c+d\right )}{4\,c+2\,d}\right )\,\left (2\,c+d\right )}{f}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (2\,a\,c+a\,d\right )-\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,a\,c+3\,a\,d\right )}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + a/cos(e + f*x))*(c + d/cos(e + f*x)))/cos(e + f*x),x)

[Out]

(a*atanh((2*tan(e/2 + (f*x)/2)*(2*c + d))/(4*c + 2*d))*(2*c + d))/f - (tan(e/2 + (f*x)/2)^3*(2*a*c + a*d) - ta
n(e/2 + (f*x)/2)*(2*a*c + 3*a*d))/(f*(tan(e/2 + (f*x)/2)^4 - 2*tan(e/2 + (f*x)/2)^2 + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a \left (\int c \sec {\left (e + f x \right )}\, dx + \int c \sec ^{2}{\left (e + f x \right )}\, dx + \int d \sec ^{2}{\left (e + f x \right )}\, dx + \int d \sec ^{3}{\left (e + f x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e)),x)

[Out]

a*(Integral(c*sec(e + f*x), x) + Integral(c*sec(e + f*x)**2, x) + Integral(d*sec(e + f*x)**2, x) + Integral(d*
sec(e + f*x)**3, x))

________________________________________________________________________________________